#include <wx/wx.h>
#include <wx/glCanvas.h>
#include <wx/timer.h>


#include "Logger.h"
#include "Image.h"
#include "Transition.h"
#include "Scene.h"


#ifndef __PDFGL__
#define __PDFGL__


class PDFGL : public wxGLCanvas
{
    public:
        //wxGLContext* mGLContext;

        PDFGL(wxFrame* parent, const wxSize& size, int* args);

        int getWidth();
        int getHeight();
        void Render();

        void render(wxPaintEvent& event);
        void resized(wxSizeEvent& event);
        void prepare3DViewport(int topleft_x, int topleft_y, int bottomright_x, int bottomright_y);
        void prepare2DViewport(int topleft_x, int topleft_y, int bottomrigth_x, int bottomrigth_y);
        void OnTimer(wxTimerEvent& event);
        
        void setScene();


    private:
        Logger* logger;
//        GLuint texture;
//        TextureManager* mTexture;
        Image* image;
        bool xflip, yflip;
        wxTimer* mTimer;
        Scene* scene;

        DECLARE_EVENT_TABLE()
};
#endif
